package main

import (
	"bytes"
	"encoding/binary"
	"fmt"
	"strconv"
	"strings"
)

func main() {
	buf := new(bytes.Buffer)
	var s = "我很爱国"
	var sb []byte = []byte(s)

	err := binary.Write(buf, binary.LittleEndian, sb)
	if err != nil {
		fmt.Println("binary.write failed:", err)
	}
	fmt.Printf("%b \n", sb)
	acc := strconv.QuoteToASCII(s)
	acc = strings.TrimSpace(strings.Trim(acc, "\""))

	for _, v := range strings.Split(acc, "\\u") {
		fmt.Println(v)
	}

}
